Skip to content

Conversation

@shawncrawley
Copy link
Contributor

@shawncrawley shawncrawley commented Dec 19, 2025

Description

I received feedback from someone trying to learn Component Apps that they were not able to display GeoJSON on their map. Turns out that this was a shortcoming of Comopnent Apps that has now been addressed with this PR. A new Recipe was added to document how this is now done.

Changes Made to Code

  • tethys_components/resources/reactjs_module_wrapper_template.js was updated to more robustly handle events
  • tethys_apps/static/tethys_apps/js/ol-mods.js was added to handle unique GeoJSON cases
  • tethys_components/library.py was updated to included an OVERRIDES variable that can override built-in library components with a custom component. In this case, the lib.ol.source.Vector component is overridden with the custom lib.olmod.VectorSource package that points to "tethys_apps/static/tethys_apps/js/ol-mods.js"

Related PRs, Issues, and Discussions

Additional Notes

Quality Checks

  • At least one new test has been written for new code
  • New code has 100% test coverage
  • Code has been formatted with Black
  • Code has been linted with flake8
  • Docstrings for new methods have been added
  • The documentation has been updated appropriately

@coveralls
Copy link

coveralls commented Dec 19, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling b7040fd on reactpy-fixes
into 935a361 on main.

@shawncrawley
Copy link
Contributor Author

This one should be good to go. Merry Christmas!

Copy link
Member

@swainn swainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few debugging lines that need to be removed.

@swainn swainn merged commit edfbc10 into main Dec 31, 2025
29 checks passed
@swainn swainn deleted the reactpy-fixes branch December 31, 2025 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants